package com.cosmo.prototype.demo01;

public class test {
    public static void main(String[] args) throws CloneNotSupportedException {

        WuKong obj1 = new WuKong();
        obj1.setName("孙悟空");
        obj1.setStick(new Stick("金箍棒","孙悟空的"));


        WuKong obj2 = obj1.clone();
        System.out.println(obj2.getName());//孙悟空
        System.out.println("obj1==obj2?" + (obj1 == obj2));//fasle
        System.out.println(obj2.getStick()==obj1.getStick());//true
    }
}
